package com.css.zfzx.sjcj.common.spacedata;


import com.css.zfzx.sjcj.common.spacedata.vo.SpaceDataParamsVo;
import com.css.zfzx.sjcj.modules.hddcActiveFault.service.HddcActivefaultService;
import com.css.zfzx.sjcj.modules.hddcActiveFaultPositionerror.service.HddcActivefaultpositionerrorService;
import com.css.zfzx.sjcj.modules.hddcAviationMagnetic.service.HddcAviationmagneticService;
import com.css.zfzx.sjcj.modules.hddcCrustIsoline.service.HddcCrustisolineService;
import com.css.zfzx.sjcj.modules.hddcDrillProfile.service.HddcDrillprofileService;
import com.css.zfzx.sjcj.modules.hddcGMInterpretationLine.service.HddcGminterpretationlineService;
import com.css.zfzx.sjcj.modules.hddcGeoProfileLine.service.HddcGeoprofilelineService;
import com.css.zfzx.sjcj.modules.hddcGeochemicalAbnSegment.service.HddcGeochemicalabnsegmentService;
import com.css.zfzx.sjcj.modules.hddcGeochemicalSvyLine.service.HddcGeochemicalsvylineService;
import com.css.zfzx.sjcj.modules.hddcGeologicalSvyLine.service.HddcGeologicalsvylineService;
import com.css.zfzx.sjcj.modules.hddcGeologicalSvyPlanningLine.service.HddcGeologicalsvyplanninglineService;
import com.css.zfzx.sjcj.modules.hddcGeomorphySvyLine.service.HddcGeomorphysvylineService;
import com.css.zfzx.sjcj.modules.hddcGeomorphySvyReProf.service.HddcGeomorphysvyreprofService;
import com.css.zfzx.sjcj.modules.hddcGeomorphySvyRegion.service.HddcGeomorphysvyregionService;
import com.css.zfzx.sjcj.modules.hddcGeomorphyline.service.HddcGeomorphylineService;
import com.css.zfzx.sjcj.modules.hddcGeomorphypolygon.service.HddcGeomorphypolygonService;
import com.css.zfzx.sjcj.modules.hddcGeophySvyLine.service.HddcGeophysvylineService;
import com.css.zfzx.sjcj.modules.hddcGravityField.service.HddcGravityfieldService;
import com.css.zfzx.sjcj.modules.hddcImageIndexLayer.service.HddcImageindexlayerService;
import com.css.zfzx.sjcj.modules.hddcLava.service.HddcLavaService;
import com.css.zfzx.sjcj.modules.hddcMainAFSvyRegion.service.HddcMainafsvyregionService;
import com.css.zfzx.sjcj.modules.hddcMaterialPolygonLayer.service.HddcMaterialpolygonlayerService;
import com.css.zfzx.sjcj.modules.hddcRSInterpretationLine.service.HddcRsinterpretationlineService;
import com.css.zfzx.sjcj.modules.hddcRSInterpretationPolygon.service.HddcRsinterpretationpolygonService;
import com.css.zfzx.sjcj.modules.hddcRock1LinePre.service.HddcRock1linepreService;
import com.css.zfzx.sjcj.modules.hddcRock1Pre.service.HddcRock1preService;
import com.css.zfzx.sjcj.modules.hddcRock25LinePre.service.HddcRock25linepreService;
import com.css.zfzx.sjcj.modules.hddcRock25Pre.service.HddcRock25preService;
import com.css.zfzx.sjcj.modules.hddcRock5LinePre.service.HddcRock5linepreService;
import com.css.zfzx.sjcj.modules.hddcRock5Pre.service.HddcRock5preService;
import com.css.zfzx.sjcj.modules.hddcStratigraphy1LinePre.service.HddcStratigraphy1linepreService;
import com.css.zfzx.sjcj.modules.hddcStratigraphy1Pre.service.HddcStratigraphy1preService;
import com.css.zfzx.sjcj.modules.hddcStratigraphy25LinePre.service.HddcStratigraphy25linepreService;
import com.css.zfzx.sjcj.modules.hddcStratigraphy25Pre.service.HddcStratigraphy25preService;
import com.css.zfzx.sjcj.modules.hddcStratigraphy5LinePre.service.HddcStratigraphy5linepreService;
import com.css.zfzx.sjcj.modules.hddcStratigraphy5Pre.service.HddcStratigraphy5preService;
import com.css.zfzx.sjcj.modules.hddcTargetRegion.service.HddcTargetregionService;
import com.css.zfzx.sjcj.modules.hddcVerticalDeformation.service.HddcVerticaldeformationService;
import com.css.zfzx.sjcj.modules.hddcWorkRegion.service.HddcWorkregionService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.StringUtils;

import java.util.List;

@Slf4j
@Service
public class SpacedataAnalysis {

    @Autowired
    private HddcGeologicalsvyplanninglineService hddcGeologicalsvyplanninglineservice;
    @Autowired
    private HddcMainafsvyregionService hddcMainafsvyregionService;
    @Autowired
    private HddcMaterialpolygonlayerService hddcMaterialpolygonlayerService;
    @Autowired
    private HddcTargetregionService hddcTargetregionService;
    @Autowired
    private HddcWorkregionService hddcWorkregionService;
    @Autowired
    private HddcImageindexlayerService hddcImageindexlayerService;
    @Autowired
    private HddcRsinterpretationlineService hddcRsinterpretationlineService;
    @Autowired
    private HddcRsinterpretationpolygonService hddcRsinterpretationpolygonService;
    @Autowired
    private HddcAviationmagneticService hddcAviationmagneticService;
    @Autowired
    private HddcCrustisolineService hddcCrustisolineService;
    @Autowired
    private HddcGminterpretationlineService hddcGminterpretationlineService;
    @Autowired
    private HddcGravityfieldService hddcGravityfieldService;
    @Autowired
    private HddcVerticaldeformationService hddcVerticaldeformationService;
    @Autowired
    private HddcRock1linepreService hddcRock1linepreService;
    @Autowired
    private HddcRock1preService hddcRock1preService;
    @Autowired
    private HddcRock25linepreService hddcRock25linepreService;
    @Autowired
    private HddcRock25preService hddcRock25preService;
    @Autowired
    private HddcRock5linepreService hddcRock5linepreService;
    @Autowired
    private HddcRock5preService hddcRock5preService;
    @Autowired
    private HddcStratigraphy1linepreService hddcStratigraphy1linepreService;
    @Autowired
    private HddcStratigraphy1preService hddcStratigraphy1preService;
    @Autowired
    private HddcStratigraphy25linepreService hddcStratigraphy25linepreService;
    @Autowired
    private HddcStratigraphy25preService hddcStratigraphy25preService;
    @Autowired
    private HddcStratigraphy5linepreService hddcStratigraphy5linepreService;
    @Autowired
    private HddcStratigraphy5preService hddcStratigraphy5preService;
    @Autowired
    private HddcActivefaultService hddcActivefaultService;
    @Autowired
    private HddcActivefaultpositionerrorService hddcActivefaultpositionerrorService;
    @Autowired
    private HddcGeologicalsvylineService hddcGeologicalsvylineService;
    @Autowired
    private HddcGeomorphylineService hddcGeomorphylineService;
    @Autowired
    private HddcGeomorphypolygonService hddcGeomorphypolygonService;
    @Autowired
    private HddcGeoprofilelineService hddcGeoprofilelineService;
    @Autowired
    private HddcGeomorphysvyregionService hddcGeomorphysvyregionService;
    @Autowired
    private HddcGeomorphysvyreprofService hddcGeomorphysvyreprofService;
    @Autowired
    private HddcDrillprofileService hddcDrillprofileService;
    @Autowired
    private HddcGeophysvylineService hddcGeophysvylineService;
    @Autowired
    private HddcGeochemicalabnsegmentService hddcGeochemicalabnsegmentService;
    @Autowired
    private HddcGeochemicalsvylineService hddcGeochemicalsvylineService;
    @Autowired
    private HddcLavaService hddcLavaService;
    @Autowired
    private HddcGeomorphysvylineService hddcGeomorphysvylineService;

    public Boolean judgeFileParams(String[] datas, String type) {

        Boolean flag = false;
        if ("1".equals(type)) {
            //str= hddcGeologicalsvyplanninglineservice.judegeParams(datas);
            if (datas.length >= 5) {
                flag = true;
            }
        }
        if ("2".equals(type)) {
            //str= hddcMainafsvyregionService.judegeParams(datas);
            if (datas.length >= 28) {
                flag = true;
            }
        }
        if ("3".equals(type)) {
            //str= hddcMaterialpolygonlayerService.judegeParams(datas);
            if (datas.length >= 10) {
                flag = true;
            }
        }
        if ("4".equals(type)) {
            //str= hddcTargetregionService.judegeParams(datas);
            if (datas.length >= 31) {
                flag = true;
            }
        }
        if ("5".equals(type)) {
            //str= hddcWorkregionService.judegeParams(datas);
            if (datas.length >= 30) {
                flag = true;
            }
        }
        if ("6".equals(type)) {
            //str= hddcImageindexlayerService.judegeParams(datas);
            if (datas.length >= 11) {
                flag = true;
            }
        }
        if ("7".equals(type)) {
            //str= hddcRsinterpretationlineService.judegeParams(datas);
            if (datas.length >= 6) {
                flag = true;
            }
        }
        if ("8".equals(type)) {
            //str = hddcRsinterpretationpolygonService.judegeParams(datas);
            if (datas.length >= 6) {
                flag = true;
            }
        }
        if ("9".equals(type)) {
            //str = hddcAviationmagneticService.judegeParams(datas);
            if (datas.length >= 5) {
                flag = true;
            }
        }
        if ("10".equals(type)) {
            //str = hddcCrustisolineService.judegeParams(datas);
            if (datas.length >= 5) {
                flag = true;
            }
        }
        if ("11".equals(type)) {
            //str = hddcGminterpretationlineService.judegeParams(datas);
            if (datas.length >= 8) {
                flag = true;
            }
        }
        if ("12".equals(type)) {
            //str = hddcGravityfieldService.judegeParams(datas);
            if (datas.length >= 5) {
                flag = true;
            }
        }
        if ("13".equals(type)) {
            //str = hddcVerticaldeformationService.judegeParams(datas);
            if (datas.length >= 4) {
                flag = true;
            }
        }
        if ("14".equals(type)) {
            //str = hddcRock1linepreService.judegeParams(datas);
            if (datas.length >= 3) {
                flag = true;
            }
        }
        if ("15".equals(type)) {
            //str = hddcRock1preService.judegeParams(datas);
            if (datas.length >= 9) {
                flag = true;
            }
        }
        if ("16".equals(type)) {
            //str = hddcRock25linepreService.judegeParams(datas);
            if (datas.length >= 2) {
                flag = true;
            }
        }
        if ("17".equals(type)) {
            //str = hddcRock25preService.judegeParams(datas);
            if (datas.length >= 10) {
                flag = true;
            }
        }
        if ("18".equals(type)) {
            //str = hddcRock5linepreService.judegeParams(datas);
            if (datas.length >= 2) {
                flag = true;
            }
        }
        if ("19".equals(type)) {
            //str = hddcRock5preService.judegeParams(datas);
            if (datas.length >= 10) {
                flag = true;
            }
        }
        if ("20".equals(type)) {
           // str = hddcStratigraphy1linepreService.judegeParams(datas);
            if (datas.length >= 3) {
                flag = true;
            }
        }
        if ("21".equals(type)) {
            //str = hddcStratigraphy1preService.judegeParams(datas);
            if (datas.length >= 11) {
                flag = true;
            }
        }
        if ("22".equals(type)) {
            //str = hddcStratigraphy25linepreService.judegeParams(datas);
            if (datas.length >= 3) {
                flag = true;
            }
        }
        if ("23".equals(type)) {
            //str = hddcStratigraphy25preService.judegeParams(datas);
            if (datas.length >= 11) {
                flag = true;
            }
        }
        if ("24".equals(type)) {
            //str = hddcStratigraphy5linepreService.judegeParams(datas);
            if (datas.length >= 3) {
                flag = true;
            }
        }
        if ("25".equals(type)) {
            //str = hddcStratigraphy5preService.judegeParams(datas);
            if (datas.length >= 11) {
                flag = true;
            }
        }
        if ("26".equals(type)) {
           // str = hddcActivefaultService.judegeParams(datas);
            if (datas.length >= 58) {
                flag = true;
            }
        }
        if ("27".equals(type)) {
            //str = hddcGeologicalsvylineService.judegeParams(datas);
            if (datas.length >= 5) {
                flag = true;
            }
        }
        if ("28".equals(type)) {
            //str = hddcGeomorphylineService.judegeParams(datas);
            if (datas.length >= 23) {
                flag = true;
            }
        }
        if ("29".equals(type)) {
            //str = hddcGeomorphypolygonService.judegeParams(datas);
            if (datas.length >= 23) {
                flag = true;
            }
        }
        if ("30".equals(type)) {
            //str = hddcGeoprofilelineService.judegeParams(datas);
            if (datas.length >= 9) {
                flag = true;
            }
        }
        if ("31".equals(type)) {
            //str = hddcGeomorphysvylineService.judegeParams(datas);
            if (datas.length >= 11) {
                flag = true;
            }
        }
        if ("32".equals(type)) {
            //str = hddcGeomorphysvyregionService.judegeParams(datas);
            if (datas.length >= 11) {
                flag = true;
            }
        }
        if ("33".equals(type)) {
            //str = hddcGeomorphysvyreprofService.judegeParams(datas);
            if (datas.length >= 8) {
                flag = true;
            }
        }
        if ("34".equals(type)) {
            //str = hddcDrillprofileService.judegeParams(datas);
            if (datas.length >= 13) {
                flag = true;
            }
        }
        if ("35".equals(type)) {
            //str = hddcGeophysvylineService.judegeParams(datas);
            if (datas.length >= 19) {
                flag = true;
            }
        }
        if ("36".equals(type)) {
            //str = hddcGeochemicalabnsegmentService.judegeParams(datas);
            if (datas.length >= 10) {
                flag = true;
            }
        }
        if ("37".equals(type)) {
            //str = hddcGeochemicalsvylineService.judegeParams(datas);
            if (datas.length >= 19) {
                flag = true;
            }
        }
        if ("38".equals(type)) {
            //str = hddcLavaService.judegeParams(datas);
            if (datas.length >= 19) {
                flag = true;
            }
        }
        if ("39".equals(type)) {
            //str = hddcLavaService.judegeParams(datas);
            if (datas.length >= 2) {
                flag = true;
            }
        }
        return flag;
    }

    public void saveFileDatas(List<List<Object>> list, SpaceDataParamsVo paramsVo) {
        //备选字段8保存savefilename
        boolean flag = false;
        if ("39".equals(paramsVo.getType())) {
            for(int i=0;i<list.size();i++) {
                List<Object> obs = list.get(i);
                Object id = obs.get(1);
                if(StringUtils.isEmpty(id)){
                    throw new RuntimeException("活断层误差编号不能为空，请检查数据中第1个属性值");
                }
                Object name=obs.get(2);
                if(StringUtils.isEmpty(name)){
                    throw new RuntimeException("活断层误差名称不能为空，请检查数据中第4个属性值");
                }
                if(name.toString().length()<=3){
                    throw new RuntimeException("活断层误差名称不能低于3个字符");
                }
            }
            hddcActivefaultpositionerrorService.savehddcActivefaultpositionerrorServiceFromShpFiles(list, paramsVo.getProvinceName(), paramsVo.getCityName(), paramsVo.getAreaName(), paramsVo.getSavefilename());
            //hddcGeologicalsvyplanninglineservice.saveHddcGeologicalsvyplanninglineFromShpFiles(list,paramsVo.getProvinceCode(),paramsVo.getCityCode(),paramsVo.getAreaCode());
        }
        if ("1".equals(paramsVo.getType())) {
            flag = hddcGeologicalsvyplanninglineservice.saveHddcGeologicalsvyplanninglineFromShpFiles(list, paramsVo.getProvinceName(), paramsVo.getCityName(), paramsVo.getAreaName(), paramsVo.getSavefilename());
            //hddcGeologicalsvyplanninglineservice.saveHddcGeologicalsvyplanninglineFromShpFiles(list,paramsVo.getProvinceCode(),paramsVo.getCityCode(),paramsVo.getAreaCode());

        }
        if ("26".equals(paramsVo.getType())) {
            boolean datasucceed=true;
            for(int i=0;i<list.size();i++) {
                List<Object> obs = list.get(i);
                Object id = obs.get(1);
                if(StringUtils.isEmpty(id)){
                    throw new RuntimeException("活断层编号不能为空，请检查数据中第1个属性值");
                }
                Object name=obs.get(4);
                if(StringUtils.isEmpty(name)){
                    throw new RuntimeException("活断层名称不能为空，请检查数据中第4个属性值");
                }
                if(name.toString().length()<=3){
                    throw new RuntimeException("活断层名称不能低于3个字符");
                }
            }
            if(datasucceed) {
                hddcActivefaultService.savehddcActivefaultServiceFromShpFiles(list, paramsVo.getProvinceName(), paramsVo.getCityName(), paramsVo.getAreaName(), paramsVo.getSavefilename());
            }
            //hddcGeologicalsvyplanninglineservice.saveHddcGeologicalsvyplanninglineFromShpFiles(list,paramsVo.getProvinceCode(),paramsVo.getCityCode(),paramsVo.getAreaCode());
        }
        if ("27".equals(paramsVo.getType())) {
            hddcGeologicalsvylineService.savehddcGeologicalsvylineServiceFromShpFiles(list, paramsVo.getProvinceName(), paramsVo.getCityName(), paramsVo.getAreaName(), paramsVo.getSavefilename());
            //hddcGeologicalsvyplanninglineservice.saveHddcGeologicalsvyplanninglineFromShpFiles(list,paramsVo.getProvinceCode(),paramsVo.getCityCode(),paramsVo.getAreaCode());
        }
        if ("28".equals(paramsVo.getType())) {
            hddcGeomorphylineService.savehddcGeomorphylineServiceFromShpFiles(list, paramsVo.getProvinceName(), paramsVo.getCityName(), paramsVo.getAreaName(), paramsVo.getSavefilename());
            //hddcGeologicalsvyplanninglineservice.saveHddcGeologicalsvyplanninglineFromShpFiles(list,paramsVo.getProvinceCode(),paramsVo.getCityCode(),paramsVo.getAreaCode());
        }
        if ("29".equals(paramsVo.getType())) {
            hddcGeomorphypolygonService.savehddcGeomorphypolygonServiceFromShpFiles(list, paramsVo.getProvinceName(), paramsVo.getCityName(), paramsVo.getAreaName(), paramsVo.getSavefilename());
            //hddcGeologicalsvyplanninglineservice.saveHddcGeologicalsvyplanninglineFromShpFiles(list,paramsVo.getProvinceCode(),paramsVo.getCityCode(),paramsVo.getAreaCode());
        }
        if ("30".equals(paramsVo.getType())) {
            hddcGeoprofilelineService.savehddcGeoprofilelineServiceFromShpFiles(list, paramsVo.getProvinceName(), paramsVo.getCityName(), paramsVo.getAreaName(), paramsVo.getSavefilename());
            //hddcGeologicalsvyplanninglineservice.saveHddcGeologicalsvyplanninglineFromShpFiles(list,paramsVo.getProvinceCode(),paramsVo.getCityCode(),paramsVo.getAreaCode());
        }
        if ("31".equals(paramsVo.getType())) {
            hddcGeomorphysvylineService.savehddcGeomorphysvylineServiceFromShpFiles(list, paramsVo.getProvinceName(), paramsVo.getCityName(), paramsVo.getAreaName(), paramsVo.getSavefilename());
            //hddcGeologicalsvyplanninglineservice.saveHddcGeologicalsvyplanninglineFromShpFiles(list,paramsVo.getProvinceCode(),paramsVo.getCityCode(),paramsVo.getAreaCode());
        }
        if ("32".equals(paramsVo.getType())) {
            hddcGeomorphysvyregionService.savehddcGeomorphysvyregionServiceFromShpFiles(list, paramsVo.getProvinceName(), paramsVo.getCityName(), paramsVo.getAreaName(), paramsVo.getSavefilename());
            //hddcGeologicalsvyplanninglineservice.saveHddcGeologicalsvyplanninglineFromShpFiles(list,paramsVo.getProvinceCode(),paramsVo.getCityCode(),paramsVo.getAreaCode());
        }
        if ("33".equals(paramsVo.getType())) {
            hddcGeomorphysvyreprofService.savehddcGeomorphysvyreprofServiceFromShpFiles(list, paramsVo.getProvinceName(), paramsVo.getCityName(), paramsVo.getAreaName(), paramsVo.getSavefilename());
            //hddcGeologicalsvyplanninglineservice.saveHddcGeologicalsvyplanninglineFromShpFiles(list,paramsVo.getProvinceCode(),paramsVo.getCityCode(),paramsVo.getAreaCode());
        }
        if ("34".equals(paramsVo.getType())) {
            hddcDrillprofileService.savehddcDrillprofileServiceFromShpFiles(list, paramsVo.getProvinceName(), paramsVo.getCityName(), paramsVo.getAreaName(), paramsVo.getSavefilename());
            //hddcGeologicalsvyplanninglineservice.saveHddcGeologicalsvyplanninglineFromShpFiles(list,paramsVo.getProvinceCode(),paramsVo.getCityCode(),paramsVo.getAreaCode());
        }
        if ("35".equals(paramsVo.getType())) {
            hddcGeophysvylineService.savehddcGeophysvylineServiceFromShpFiles(list, paramsVo.getProvinceName(), paramsVo.getCityName(), paramsVo.getAreaName(), paramsVo.getSavefilename());
            //hddcGeologicalsvyplanninglineservice.saveHddcGeologicalsvyplanninglineFromShpFiles(list,paramsVo.getProvinceCode(),paramsVo.getCityCode(),paramsVo.getAreaCode());
        }
        if ("36".equals(paramsVo.getType())) {
            hddcGeochemicalabnsegmentService.savehddcGeochemicalabnsegmentServiceFromShpFiles(list, paramsVo.getProvinceName(), paramsVo.getCityName(), paramsVo.getAreaName(), paramsVo.getSavefilename());
            //hddcGeologicalsvyplanninglineservice.saveHddcGeologicalsvyplanninglineFromShpFiles(list,paramsVo.getProvinceCode(),paramsVo.getCityCode(),paramsVo.getAreaCode());
        }
        if ("37".equals(paramsVo.getType())) {
            hddcGeochemicalsvylineService.savehddcGeochemicalsvylineServiceFromShpFiles(list, paramsVo.getProvinceName(), paramsVo.getCityName(), paramsVo.getAreaName(), paramsVo.getSavefilename());
            //hddcGeologicalsvyplanninglineservice.saveHddcGeologicalsvyplanninglineFromShpFiles(list,paramsVo.getProvinceCode(),paramsVo.getCityCode(),paramsVo.getAreaCode());
        }
        if ("38".equals(paramsVo.getType())) {
            hddcLavaService.savehddcLavaServiceFromShpFiles(list, paramsVo.getProvinceName(), paramsVo.getCityName(), paramsVo.getAreaName(), paramsVo.getSavefilename());
            //hddcGeologicalsvyplanninglineservice.saveHddcGeologicalsvyplanninglineFromShpFiles(list,paramsVo.getProvinceCode(),paramsVo.getCityCode(),paramsVo.getAreaCode());
        }
        if ("2".equals(paramsVo.getType())) {
            hddcMainafsvyregionService.saveHddcMainafsvyregionFromShpFiles(list, paramsVo.getProvinceName(), paramsVo.getCityName(), paramsVo.getAreaName(), paramsVo.getSavefilename());
        }
        if ("3".equals(paramsVo.getType())) {
            hddcMaterialpolygonlayerService.saveHddcMaterialpolygonlayerFromShpFiles(list, paramsVo.getProvinceName(), paramsVo.getCityName(), paramsVo.getAreaName(), paramsVo.getSavefilename());
        }
        if ("4".equals(paramsVo.getType())) {
            hddcTargetregionService.saveHddcTargetregionFromShpFiles(list, paramsVo.getProvinceName(), paramsVo.getCityName(), paramsVo.getAreaName(), paramsVo.getSavefilename());
        }
        if ("5".equals(paramsVo.getType())) {
            hddcWorkregionService.saveHddcWorkregionFromShpFiles(list, paramsVo.getProvinceName(), paramsVo.getCityName(), paramsVo.getAreaName(), paramsVo.getSavefilename());
        }
        if ("6".equals(paramsVo.getType())) {
            hddcImageindexlayerService.saveHddcImageindexlayerFromShpFiles(list, paramsVo.getProvinceName(), paramsVo.getCityName(), paramsVo.getAreaName(), paramsVo.getSavefilename());
        }
        if ("7".equals(paramsVo.getType())) {
            hddcRsinterpretationlineService.saveHddcRsinterpretationlineFromShpFiles(list, paramsVo.getProvinceName(), paramsVo.getCityName(), paramsVo.getAreaName(), paramsVo.getSavefilename());
        }
        if ("8".equals(paramsVo.getType())) {
            hddcRsinterpretationpolygonService.saveHddcRsinterpretationpolygonFromShpFiles(list, paramsVo.getProvinceName(), paramsVo.getCityName(), paramsVo.getAreaName(), paramsVo.getSavefilename());
        }
        if ("9".equals(paramsVo.getType())) {
            hddcAviationmagneticService.saveHddcAviationmagneticFromShpFiles(list, paramsVo.getProvinceName(), paramsVo.getCityName(), paramsVo.getAreaName(), paramsVo.getSavefilename());
        }
        if ("10".equals(paramsVo.getType())) {
            hddcCrustisolineService.saveHddcCrustisolineFromShpFiles(list, paramsVo.getProvinceName(), paramsVo.getCityName(), paramsVo.getAreaName(), paramsVo.getSavefilename());
        }
        if ("11".equals(paramsVo.getType())) {
            hddcGminterpretationlineService.saveHddcGminterpretationlineFromShpFiles(list, paramsVo.getProvinceName(), paramsVo.getCityName(), paramsVo.getAreaName(), paramsVo.getSavefilename());
        }
        if ("12".equals(paramsVo.getType())) {
            hddcGravityfieldService.saveHddcGravityfieldFromShpFiles(list, paramsVo.getProvinceName(), paramsVo.getCityName(), paramsVo.getAreaName(), paramsVo.getSavefilename());
        }
        if ("13".equals(paramsVo.getType())) {
            hddcVerticaldeformationService.saveHddcVerticaldeformationFromShpFiles(list, paramsVo.getProvinceName(), paramsVo.getCityName(), paramsVo.getAreaName(), paramsVo.getSavefilename());
        }
        if ("14".equals(paramsVo.getType())) {
            hddcRock1linepreService.savehddcRock1linepreServiceFromShpFiles(list, paramsVo.getProvinceName(), paramsVo.getCityName(), paramsVo.getAreaName(), paramsVo.getSavefilename());
        }
        if ("15".equals(paramsVo.getType())) {
            hddcRock1preService.saveRock1preServiceFromShpFiles(list, paramsVo.getProvinceName(), paramsVo.getCityName(), paramsVo.getAreaName(), paramsVo.getSavefilename());
        }
        if ("16".equals(paramsVo.getType())) {
            hddcRock25linepreService.saveRock25linepreServiceFromShpFiles(list, paramsVo.getProvinceName(), paramsVo.getCityName(), paramsVo.getAreaName(), paramsVo.getSavefilename());
        }
        if ("17".equals(paramsVo.getType())) {
            hddcRock25preService.saveRock25preServiceFromShpFiles(list, paramsVo.getProvinceName(), paramsVo.getCityName(), paramsVo.getAreaName(), paramsVo.getSavefilename());
        }
        if ("18".equals(paramsVo.getType())) {
            hddcRock5linepreService.saveRock5linepreServiceFromShpFiles(list, paramsVo.getProvinceName(), paramsVo.getCityName(), paramsVo.getAreaName(), paramsVo.getSavefilename());
        }
        if ("19".equals(paramsVo.getType())) {
            hddcRock5preService.saveRock5preServiceFromShpFiles(list, paramsVo.getProvinceName(), paramsVo.getCityName(), paramsVo.getAreaName(), paramsVo.getSavefilename());
        }
        if ("20".equals(paramsVo.getType())) {
            hddcStratigraphy1linepreService.saveStratigraphy1linepreServiceFromShpFiles(list, paramsVo.getProvinceName(), paramsVo.getCityName(), paramsVo.getAreaName(), paramsVo.getSavefilename());
        }
        if ("21".equals(paramsVo.getType())) {
            hddcStratigraphy1preService.saveStratigraphy1preServiceFromShpFiles(list, paramsVo.getProvinceName(), paramsVo.getCityName(), paramsVo.getAreaName(), paramsVo.getSavefilename());
        }
        if ("22".equals(paramsVo.getType())) {
            hddcStratigraphy25linepreService.saveStratigraphy25linepreServiceFromShpFiles(list, paramsVo.getProvinceName(), paramsVo.getCityName(), paramsVo.getAreaName(), paramsVo.getSavefilename());
        }
        if ("23".equals(paramsVo.getType())) {
            hddcStratigraphy25preService.saveStratigraphy25preServiceFromShpFiles(list, paramsVo.getProvinceName(), paramsVo.getCityName(), paramsVo.getAreaName(), paramsVo.getSavefilename());
        }
        if ("24".equals(paramsVo.getType())) {
            hddcStratigraphy5linepreService.saveStratigraphy5linepreServiceFromShpFiles(list, paramsVo.getProvinceName(), paramsVo.getCityName(), paramsVo.getAreaName(), paramsVo.getSavefilename());
        }
        if ("25".equals(paramsVo.getType())) {
            hddcStratigraphy5preService.saveStratigraphy5preServiceFromShpFiles(list, paramsVo.getProvinceName(), paramsVo.getCityName(), paramsVo.getAreaName(), paramsVo.getSavefilename());
        }


    }

    public void deleteFileData(SpaceDataParamsVo paramsVo) {
        if ("1".equals(paramsVo.getType())) {
            hddcGeologicalsvyplanninglineservice.deleteFileData(paramsVo);
        }
        if ("26".equals(paramsVo.getType())) {
            hddcActivefaultService.deleteFileData(paramsVo);
        }
        //hddcActivefaultpositionerrorService
        if ("39".equals(paramsVo.getType())) {
            hddcActivefaultpositionerrorService.deleteFileData(paramsVo);
        }
        if ("27".equals(paramsVo.getType())) {
            hddcGeologicalsvylineService.deleteFileData(paramsVo);
        }
        if ("28".equals(paramsVo.getType())) {
            hddcGeomorphylineService.deleteFileData(paramsVo);
        }
        if ("29".equals(paramsVo.getType())) {
            hddcGeomorphypolygonService.deleteFileData(paramsVo);
        }
        if ("30".equals(paramsVo.getType())) {
            hddcGeoprofilelineService.deleteFileData(paramsVo);
        }
        if ("31".equals(paramsVo.getType())) {
            hddcGeomorphysvylineService.deleteFileData(paramsVo);
        }
        if ("32".equals(paramsVo.getType())) {
            hddcGeomorphysvyregionService.deleteFileData(paramsVo);
        }
        if ("33".equals(paramsVo.getType())) {
            hddcGeomorphysvyreprofService.deleteFileData(paramsVo);
        }
        if ("34".equals(paramsVo.getType())) {
            hddcDrillprofileService.deleteFileData(paramsVo);
        }
        if ("35".equals(paramsVo.getType())) {
            hddcGeophysvylineService.deleteFileData(paramsVo);
        }
        if ("36".equals(paramsVo.getType())) {
            hddcGeochemicalabnsegmentService.deleteFileData(paramsVo);
        }
        if ("37".equals(paramsVo.getType())) {
            hddcGeochemicalsvylineService.deleteFileData(paramsVo);
        }
        if ("38".equals(paramsVo.getType())) {
            hddcLavaService.deleteFileData(paramsVo);
        }
        if ("2".equals(paramsVo.getType())) {
            hddcMainafsvyregionService.deleteFileData(paramsVo);
        }
        if ("3".equals(paramsVo.getType())) {
            hddcMaterialpolygonlayerService.deleteFileData(paramsVo);
        }
        if ("4".equals(paramsVo.getType())) {
            hddcTargetregionService.deleteFileData(paramsVo);
        }
        if ("5".equals(paramsVo.getType())) {
            hddcWorkregionService.deleteFileData(paramsVo);
        }
        if ("6".equals(paramsVo.getType())) {
            hddcImageindexlayerService.deleteFileData(paramsVo);
        }
        if ("7".equals(paramsVo.getType())) {
            hddcRsinterpretationlineService.deleteFileData(paramsVo);
        }
        if ("8".equals(paramsVo.getType())) {
            hddcRsinterpretationpolygonService.deleteFileData(paramsVo);
        }
        if ("9".equals(paramsVo.getType())) {
            hddcAviationmagneticService.deleteFileData(paramsVo);
        }
        if ("10".equals(paramsVo.getType())) {
            hddcCrustisolineService.deleteFileData(paramsVo);
        }
        if ("11".equals(paramsVo.getType())) {
            hddcGminterpretationlineService.deleteFileData(paramsVo);
        }
        if ("12".equals(paramsVo.getType())) {
            hddcGravityfieldService.deleteFileData(paramsVo);
        }
        if ("13".equals(paramsVo.getType())) {
            hddcVerticaldeformationService.deleteFileData(paramsVo);
        }
        if ("14".equals(paramsVo.getType())) {
            hddcRock1linepreService.deleteFileData(paramsVo);
        }
        if ("15".equals(paramsVo.getType())) {
            hddcRock1preService.deleteFileData(paramsVo);
        }
        if ("16".equals(paramsVo.getType())) {
            hddcRock25linepreService.deleteFileData(paramsVo);
        }
        if ("17".equals(paramsVo.getType())) {
            hddcRock25preService.deleteFileData(paramsVo);
        }
        if ("18".equals(paramsVo.getType())) {
            hddcRock5linepreService.deleteFileData(paramsVo);
        }
        if ("19".equals(paramsVo.getType())) {
            hddcRock5preService.deleteFileData(paramsVo);
        }
        if ("20".equals(paramsVo.getType())) {
            hddcStratigraphy1linepreService.deleteFileData(paramsVo);
        }
        if ("21".equals(paramsVo.getType())) {
            hddcStratigraphy1preService.deleteFileData(paramsVo);
        }
        if ("22".equals(paramsVo.getType())) {
            hddcStratigraphy25linepreService.deleteFileData(paramsVo);
        }
        if ("23".equals(paramsVo.getType())) {
            hddcStratigraphy25preService.deleteFileData(paramsVo);
        }
        if ("24".equals(paramsVo.getType())) {
            hddcStratigraphy5linepreService.deleteFileData(paramsVo);
        }
        if ("25".equals(paramsVo.getType())) {
            hddcStratigraphy5preService.deleteFileData(paramsVo);
        }
    }
}
